dnd: Use a getter for the drag threshold
authorMatthias Clasen <mclasen@redhat.com>
Sun, 1 May 2016 02:00:19 +0000 (22:00 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 1 May 2016 02:39:58 +0000 (22:39 -0400)
gtk/gtkdnd.c

index 9a5dd11642616dc93b6e906c98a765f36eab1994..33a324b68a5cbbde9fb110527ecb510f58ab40d7 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "gtkdnd.h"
 #include "gtkdndprivate.h"
+#include "gtksettingsprivate.h"
 
 #include <math.h>
 #include <stdlib.h>
@@ -3259,10 +3260,8 @@ gtk_drag_check_threshold (GtkWidget *widget,
 
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  g_object_get (gtk_widget_get_settings (widget),
-                "gtk-dnd-drag-threshold", &drag_threshold,
-                NULL);
-  
+  drag_threshold = gtk_settings_get_dnd_drag_threshold (gtk_widget_get_settings (widget));
+
   return (ABS (current_x - start_x) > drag_threshold ||
           ABS (current_y - start_y) > drag_threshold);
 }